import { init } from 'snabbdom/build/package/init';
import {h} from 'snabbdom/build/package/h';

const patch = init([]);

let vnode = h('div#container',[
    h('h1','hello snabbdom'),
    h('p','这是一个p')
])

let app = document.querySelector('#app');
let oldVode = patch(app, vnode)

setTimeout(()=>{
    vnode = h('div#container',[
        h('h1','hello world'),
        h('p','这是一个p')
    ])
    patch(oldVode,vnode)
},2000)
